(Add monster's experience to Boy's and Dog's, then level them up
 and adjust their stats when necessary.  They'll gain at most one
 level per call.)

(NOTE: This function only has one difference between the US release
 and the European ones, so there's no need to paste the rest of it.)

8F/82F8: 22 E5 84 8F  JSL $8F84E5    (increase dog's level, adjust his stats
                                      accordingly, etc)


===============================================================================


(Boy gains a level, receives any accompanying stat boosts, and a message
 is queued.)

8F/8310: AD 50 0A     LDA $0A50   (get Boy's level)
8F/8313: C9 63 00     CMP #$0063
8F/8316: 30 03        BMI $831B
8F/8318: 4C 87 83     JMP $8387   (if it's >= 99, exit function)
8F/831B: 1A           INC 
8F/831C: 8D 50 0A     STA $0A50   (increment and save updated level)
8F/831F: 85 02        STA $02
8F/8321: 64 04        STZ $04     (also save the level in $00:0002 thru $00:0005,
                                   so the 80/B21F call can put its digits in a
                                   display buffer)
8F/8323: 22 88 83 8F  JSL $8F8388 (adjust boy's stats to account for his new
                                   level.  normally, they just grow, but because
                                   a stat's value at each level is stored
                                   separately, they could easily be hacked to
                                   decrease.)
8F/8327: AD 35 0A     LDA $0A35
8F/832A: 8D B3 4E     STA $4EB3   (current HP = max HP)
8F/832D: AD 50 0A     LDA $0A50
8F/8330: 0A           ASL 
8F/8331: 18           CLC 
8F/8332: 6D 50 0A     ADC $0A50
8F/8335: AA           TAX            (use level * 3 as pointer to "Experience
                                      Needed" table, as each entry is 3 bytes)
8F/8336: BF 66 8F 8C  LDA $8C8F66,X
8F/833A: 8D 1E 4F     STA $4F1E      (save total experience needed for boy
                                      to reach next level, top 2 bytes)
8F/833D: BF 65 8F 8C  LDA $8C8F65,X 
8F/8341: 8D 1D 4F     STA $4F1D      (save total experience needed for boy
                                      to reach next level, bottom byte)
8F/8344: A9 22 7E     LDA #$7E22
8F/8347: 85 27        STA $27
8F/8349: A9 10 22     LDA #$2210
8F/834C: 85 26        STA $26       (point to 7E/2210, boy's name in RAM)
8F/834E: 22 7A B3 80  JSL $80B37A   (initialize a buffer pointer in $0022 thru $0024;
                                     the Bank is 7E, and the Offset is the value
                                     of variable $0B57)
8F/8352: A5 22        LDA $22
8F/8354: 85 12        STA $12       (save pointer to the beginning of the text
                                     buffer we're about to fill and display)
8F/8356: 22 48 B1 80  JSL $80B148   (put boy's name in text buffer)
8F/835A: 98           TYA 
8F/835B: 18           CLC 
8F/835C: 65 22        ADC $22
8F/835E: 85 22        STA $22       (increment buffer pointer by # of
                                     characters stored by above call)
8F/8360: A9 E8 1D     LDA #$1DE8
8F/8363: 85 26        STA $26
8F/8365: A9 C5 00     LDA #$00C5
8F/8368: 85 28        STA $28       ($00:0026 thru $00:0028 points to C5/1DE8)
8F/836A: 22 48 B1 80  JSL $80B148   (add " reaches level " to display buffer)
8F/836E: 98           TYA 
8F/836F: 18           CLC 
8F/8370: 65 22        ADC $22
8F/8372: 85 22        STA $22       (increment buffer pointer by # of
                                     characters stored by above call)
8F/8374: 22 1F B2 80  JSL $80B21F   (turn a 32-bit number, stored in $00:0002
                                     thru $00:0005, into text and add it to
                                     display buffer.  in this case, it's the
                                     level number we're displaying.)
8F/8378: A5 12        LDA $12
8F/837A: 85 22        STA $22       (get pointer to beginning of text buffer)
8F/837C: 22 E4 C8 8C  JSL $8CC8E4   (now output the whole string?
                                     "[Boy's name] reaches level NN")
8F/8380: A2 89 4E     LDX #$4E89
8F/8383: 22 1A 91 8F  JSL $8F911A   (???)
8F/8387: 6B           RTL 


===============================================================================


(Dog gains a level, receives any accompanying stat boosts, and a message
 is queued.)

8F/84E5: AD 9A 0A     LDA $0A9A    (get Dog's level)
8F/84E8: C9 63 00     CMP #$0063
8F/84EB: 30 03        BMI $84F0
8F/84ED: 4C 5C 85     JMP $855C    (if it's >= 99, exit function)
8F/84F0: 1A           INC 
8F/84F1: 8D 9A 0A     STA $0A9A    (increment and save updated level)
8F/84F4: 85 02        STA $02
8F/84F6: 64 04        STZ $04      (also save the level in $00:0002 thru $00:0005,
                                    so the 80/B21F call can put its digits in a
                                    display buffer)
8F/84F8: 22 5D 85 8F  JSL $8F855D  (adjust dog's stats to account for its new
                                    level.  normally, they just grow, but because
                                    a stat's value at each level is stored
                                    separately, they could easily be hacked to
                                    decrease.)
8F/84FC: AD 7F 0A     LDA $0A7F
8F/84FF: 8D 61 4F     STA $4F61    (current HP = max HP)
8F/8502: AD 9A 0A     LDA $0A9A
8F/8505: 0A           ASL 
8F/8506: 18           CLC 
8F/8507: 6D 9A 0A     ADC $0A9A
8F/850A: AA           TAX            (use level * 3 as pointer to "Experience
                                      Needed" table, as each entry is 3 bytes)
8F/850B: BF 92 90 8C  LDA $8C9092,X
8F/850F: 8D CC 4F     STA $4FCC      (save total experience needed for dog
                                      to reach next level, top 2 bytes)
8F/8512: BF 91 90 8C  LDA $8C9091,X
8F/8516: 8D CB 4F     STA $4FCB      (save total experience needed for dog
                                      to reach next level, bottom byte)
8F/8519: A9 22 7E     LDA #$7E22
8F/851C: 85 27        STA $27
8F/851E: A9 34 22     LDA #$2234
8F/8521: 85 26        STA $26       (point to 7E/2234, dog's name in RAM)
8F/8523: 22 7A B3 80  JSL $80B37A   (initialize a buffer pointer in $0022 thru $0024;
                                     the Bank is 7E, and the Offset is the value
                                     of variable $0B57)
8F/8527: A5 22        LDA $22
8F/8529: 85 12        STA $12       (save pointer to the beginning of the text
                                     buffer we're about to fill and display)
8F/852B: 22 48 B1 80  JSL $80B148   (put dog's name in text buffer)
8F/852F: 98           TYA 
8F/8530: 18           CLC 
8F/8531: 65 22        ADC $22
8F/8533: 85 22        STA $22       (increment buffer pointer by # of
                                     characters stored by above call)
8F/8535: A9 E8 1D     LDA #$1DE8
8F/8538: 85 26        STA $26
8F/853A: A9 C5 00     LDA #$00C5
8F/853D: 85 28        STA $28       ($00:0026 thru $00:0028 points to C5/1DE8)
8F/853F: 22 48 B1 80  JSL $80B148   (add " reaches level " to display buffer)
8F/8543: 98           TYA 
8F/8544: 18           CLC 
8F/8545: 65 22        ADC $22
8F/8547: 85 22        STA $22       (increment buffer pointer by # of
                                     characters stored by above call)
8F/8549: 22 1F B2 80  JSL $80B21F   (turn a 32-bit number, stored in $00:0002
                                     thru $00:0005, into text and add it to
                                     display buffer.  in this case, it's the
                                     level number we're displaying.)
8F/854D: A5 12        LDA $12
8F/854F: 85 22        STA $22       (get pointer to beginning of text buffer)
8F/8551: 22 E4 C8 8C  JSL $8CC8E4   (now output the whole string?
                                     "[Dog's name] reaches level NN")
8F/8555: A2 37 4F     LDX #$4F37
8F/8558: 22 1A 91 8F  JSL $8F911A   (???)
8F/855C: 6B           RTL


===============================================================================


(" reaches level " text.
 holy shat!!  ASCII in a game?!  that's a novel idea..)

C5/1DE8: 20  (space)
C5/1DE9: 72  ("r")
C5/1DEA: 65  ("e")  
C5/1DEB: 61  ("a") 
C5/1DEC: 63  ("c")
C5/1DED: 68  ("h")
C5/1DEE: 65  ("e")
C5/1DEF: 73  ("s")
C5/1DF0: 20  (space)
C5/1DF1: 6C  ("l")
C5/1DF2: 65  ("e")
C5/1DF3: 76  ("v")
C5/1DF4: 65  ("e")
C5/1DF5: 6C  ("l")
C5/1DF6: 20  (space)
C5/1DF7: 00  (null terminator)

